﻿<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<html>
<head>
    <title></title>   
</head>
<body>
<%@ include file="head.jsp"%>

<form action="/CA_Project/ApplyLeave" method=post>

             <table width=100px>
                    <tr>
                        <td align="left">
                            DD</td>
                        <td align="left">
                            MM</td>
                        <td align="left">
                            YYYY</td>
                        <td align="left">
                            AM/PM</td>                           
                        <td align="left">
                        </td>
                        <td align="left">
                            DD</td>
                        <td align="left">
                            MM</td>
                        <td align="left">
                            YYYY</td>
                        <td>
                            AM/PM</td>
                    </tr>
                    <tr>
                        <td>
                            <input id="StartDay" name = "StartDay"  align="middle" type="text" /></td>
                        <td>
                            <input id="StartMonth" name = "StartMonth" align="middle" type="text" /></td>
                        <td>
                            <input id="StartYear" name = "StartYear" align="middle" type="text" /></td>
                        <td>
                            <input id="StartRadio1" type="radio" name = "r1" value = "AM" /><input id="StartRadio2" type="radio" name = "r1" value = "PM" /></td>
                        <td>
                            To</td>
                        <td>
                            <input id="EndDay" name = "EndDay"  align="middle" type="text" /></td>
                        <td>
                            <input id="EndMonth" name = "EndMonth" align="middle" type="text" /></td>
                        <td>
                            <input id="EndYear" name = "EndYear" align="middle" type="text" /></td>
                        <td>
                            <input id="EndRadio1" type="radio" name = "r2" value = "AM" /><input id="EndRadio2" type="radio" name = "r2" value = "PM" /></td>
                    </tr>
                    </table>
  
  <table>
          <tr>
          <td width="621px">
                Leave Period:</td>
          <td width="581px">
                Leave Type       <select name="selectType" id="selectType">  
                                    <option value="Annual">Annual</option>  
                                    <option value="Medical">Medical</option>  
                                    <option value="Compensation">Compensation</option>  
                                  </select> 
            </td>
            </tr>
            <tr>
            <td>
                 Reason<br />
                <textarea rows="8" cols="60" id="Reason" name="Reason"></textarea></td>
            
            <td class="style5">
                Annual Leave<br/>
                <input id="AnnualUse" readonly="readonly" type="text" value = "${UserInfo._annualLeave}"/> left
                <input id="AnnualTotal" readonly="readonly" type="text" value = "${UserInfo._annualLeaveEntitlement}"/> Total<br/>
                Medical Leave<br/>
                <input id="MedicalUsed" readonly="readonly" type="text" value = "${UserInfo._medicalLeave}"/> used<br/>
                Compensation<br/>
                <input id="CompensationUsed" readonly="readonly" type="text" value = "${UserInfo._compensationLeave}"/>Total  </td>
        </tr>
        <tr>
            <td>
                Work Dissemination<br />
                <input id="WorkDiss" name = "WorkDiss" type="text" /></td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <input id="Submit1" align="middle" type="submit" value="Apply" /></td>  
        </tr>
        <c:if test = "${SessionScope.ErrorCaused == true}">
		<td>
			Incorrect Input of Date
		</td>
	</c:if>
	<c:if test = "${SessionScope.ErrorCaused == false} ">
		<td>
			Successfully applied
		</td>
	</c:if>
    </table>



</form>
</body>
</html>
